package com.woniuxy.woniuticket.notification.controller;

import com.woniuxy.woniuticket.notification.interceptor.Hank;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//mq服务端控制器
@RestController
public class Controller {
    @Autowired
    private AmqpTemplate amqpTemplate;
    @RequestMapping("/send")
    public void SennerMsg(){
        String msg="有新的热点消息";
        amqpTemplate.convertAndSend("exchange","a",msg);
    }
}
